<!--
 * @Author: 田育 373107754@qq.com
 * @Date: 2024-01-23 16:37:28
 * @LastEditTime: 2024-01-23 16:38:59
 * @LastEditors: 田育 373107754@qq.com
 * @Description: 辽宁特例
 * @FilePath: \zmglpt-ui-mobile-v1.1\dev\pages\score\brandDetail.zh-LN.vue
 * 相关信息录入，可配置一些自己的信息项
-->

<template>
  <view>
    <view class="retail">
      <fsection :title="title.basemsg" class="pl-16"></fsection>
      <u-gap :height="$theme.cm_section_top_gap_height" :bg-color="$theme.cm_gap_color"></u-gap>
    </view>
    <view class="ordermsg">
      <mescroll-list :i="0" :index="0" :height="getListViewHeight()" :load-data="myLoadData" :init-load="false"
                     ref="mescrollItem" class="listview">
        <template slot-scope="d">
          <view class="divided-line">
            <u-row gutter="16" align="top" class="rowde">
              <u-col span="3">
                <view class="msg-title">
                  走访人员：
                </view>
              </u-col>
              <u-col span="9">
                <view class="msg-title">
                  {{ d.data.userName || "/" }}
                </view>
              </u-col>
            </u-row>
            <u-row gutter="16" align="top" class="rowde">
              <u-col span="3">
                <view class="msg-title">
                  走访日期：
                </view>
              </u-col>
              <u-col span="9">
                <view class="msg-title">
                  {{ d.data.date || "/" }}
                </view>
              </u-col>
            </u-row>
            <u-row gutter="16" align="top" class="rowde">
              <u-col span="3">
                <u-row>
                  <view class="msg-title" align="left" style="text-align: center">
                    品 规：
                  </view>
                </u-row>
                <view class="msg-title" align="left" style="text-align: center">
                  <text>(价格类)</text>
                </view>
              </u-col>
              <u-col span="9">
                <u-row v-for="(item,index) in d.data.detailList.filter(item => item.type === '0')"
                       :key="index">
                  <view class="msg-title">
                    {{ item.descInfo || "/" }}
                  </view>
                </u-row>
              </u-col>
            </u-row>
            <u-row gutter="16" align="top" class="rowde">
              <u-col span="3">
                <u-row>
                  <view class="msg-title" align="left" style="text-align: center">
                    品 规：
                  </view>
                </u-row>
                <view class="msg-title" align="left" style="text-align: center">
                  <text>(存销比)</text>
                </view>
              </u-col>
              <u-col span="9">
                <u-row v-for="(item,index) in d.data.detailList.filter(item => item.type === '1')"
                       :key="index">
                  <view class="msg-title">
                    {{ item.descInfo || "/" }}
                  </view>
                </u-row>
              </u-col>
            </u-row>
            <u-row gutter="16" align="top" class="rowde">
              <u-col span="3">
                <view class="msg-title" align="left">
                  汇总：
                </view>
              </u-col>
              <u-col span="9">
                <u-row v-for="(item,index) in d.data.detailList.filter(item => item.type === '2')"
                       :key="index">
                  <view class="msg-title">
                    {{ item.descInfo || "/" }}
                  </view>
                </u-row>
              </u-col>
            </u-row>

          </view>
        </template>
      </mescroll-list>
    </view>
  </view>
</template>

<script>
import meTable from '@/components/me-table.vue';
import commonService from "@/service/score/score.service.js";
import fsection from "@/components/form-section.vue";
import mescrollList from "@/components/mescroll_list.vue";

export default {
  components: {
    mescrollList, fsection,
    meTable,
  },
  props: ['retailerUuid',],
  data() {
    return {
      title: {
        basemsg: "重点关注信息",
      },
      parameterData: '',
      allData: '',
    };
  },
  mounted() {
  },
  methods: {
    getListViewHeight() {
      let p = (this.$u.sys().windowHeight - 44 - uni.upx2px(104) - uni.upx2px(120) - 8 - this.$u.sys().statusBarHeight) + "px";
      // #ifdef H5-DINGDING
      p = (this.$u.sys().windowHeight - uni.upx2px(104) - uni.upx2px(120) - 8 - this.$u.sys().statusBarHeight) + "px";
      // #endif
      return p;
    },
    myLoadData(page) {
      let self = this;
      return new Promise((resolve, reject) => {
        // console.log(this.retailerUuid,234567)
        commonService.getBrandDetail(page.num, page.size, {
          retailerUuid: this.retailerUuid,
        })
            .then(res => {
              if (res.success) {
                resolve({
                  totalCount: res.count,
                  data: [...res.data,],
                });
              } else {
                resolve({
                  totalCount: 0,
                  data: [],
                })
              }
            })
            .catch(err => {
              self.$modal.alert("请求失败");
              resolve({
                data: [],
              });
            });
      });
    },

    dataClick() {
      this.loadData();
    }


  },
};
</script>

<style lang="scss" scoped>
@import "@/pages/query/nolicence/unlicense_item.scss";
@import "@/pages/query/nolicence/detailCommon/common/listItem.scss";

.head-title {
  padding: 0rpx 12rpx 0rpx 12rpx;
  font-size: $cm_form_item_label_font_size;
  font-weight: bold;
}

.left-icon {
  margin: 0rpx 10rpx;
  width: 9rpx;
  height: 32rpx;
  background: $u-type-primary;
  opacity: 1;
  border-radius: 5px;
  display: inline-block;
}

.case-info {
  font-size: $cm_form_item_label_font_size;
}

.case-content {
  padding: 5px 0px;
}

.ordermsg {
  position: relative;
  padding: 0rpx 28rpx 10rpx 28rpx;
  margin: 10rpx 0rpx;
  background-color: #fff;
}

.ipt {
  position: absolute;
  display: flex;
  float: right;
  display: flex;
  float: right;
  left: 201px;
  top: -48px;
  text-align: center;
}

.title-style {
  display: flex;
  justify-content: space-between;

  .title-num {
    font-size: $cm_form_item_label_font_size;
    font-weight: 600;
  }

  .title-price {
    color: $u-type-warning;
    font-weight: bold;
  }
}

.coy {
  display: flex;
}

.head-title {
  padding: 0rpx 8rpx 0rpx 8rpx;
  font-size: $cm_form_item_label_font_size;
  font-weight: 600;
}

.head-data {
  position: relative;
  font-weight: 600;
  left: 10px;
  top: 0px;
}

.gold {
  position: relative;
  top: 0rpx;
  left: 140rpx;
  color: #FF9E2C;
}

</style>
